<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>米行域名批量交易-个人中心</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<include file="./Public/public/public.html" />
    <script>
        $(document).ready(function(){
            //取消订单
            var isCancelling = false;
            $("a[action='cancel_order']").click(function () {
                if (isCancelling) { showModal({msg:'操作正在进行，请稍候'}); return; }
                var _this = $(this);
                var _id = $(_this).attr('data-id');
                if (!_id) return;
                showConfirm({
                    msg:"您确定要取消该订单吗?",
                    confirmed:function(){
                        isCancelling = true;
                        $.ajax({
                            url:"{:U('UserEntrust/cancelTradeAgent')}",
                            type:"POST",
                            data:{id: _id},
                            success:function(resp){
                                isCancelling = false;
                                if (resp.status != 1) {
                                    showModal({msg:resp.msg});
                                } else {
                                    showModal({msg:resp.msg, callbackTime:1500, end:function(){ window.location.reload(true) }});
                                }
                            }
                        }).fail(function(){
                            isCancelling = false;
                        });
                    }
                })
            });
            var isSigning = false;
            $('#sign_in').click(function () {
                if (isSigning) { showModal({msg:'操作正在进行，请稍候'}); return; }
                var _this = $(this);
                isSigning = true;
                $.ajax({
                    url:"{:U('Survey/signIn')}",
                    type:"POST",
                    success:function(resp){
                        isSigning = false;
                        showModal({msg:resp.msg});
                        if (resp.status == 1) {
                            $(_this).unbind('click').removeClass('button-blue').addClass('button-gray').text('已签到');
                            var _days = $('#signin_days').text().match(/[\d\.\d]+/i);
                            _days++;
                            $('#signin_days').text(_days + '天');
                        }
                    }
                }).fail(function(){
                    isSigning = false;
                });
            });
            
            $("#zhuanchuclas").click(function(){
            	$("#popupTitle").text("转出理财宝");
            	$("#creditid").val(2);//
            	$("#mimaid").val('');
            	 $('[popup="confirmcreidt"]').reveal();
            });
            $("#zhuanruclas").click(function(){
            	$("#creditid").val(1);//
            	$("#mimaid").val('');
            	$("#popupTitle").text("转入理财宝");
           	 $('[popup="confirmcreidt"]').reveal();
           });
            $('#tijiaolicai').click(function(){
            	 $.ajax({
            	 		type: "post", 
            	 		url:"{:U('Survey/assetcredit')}", 
            	 		data:$("#ddidsdsdsds").serialize(),
            	 		async: false,
            	 		dataType:'json',
            	 		error: function(request) {}, 
            	 		success: function(data){
            	 			if(data.code=='error'){
            	 				showModal({msg:data.info});
            	 			}else{
            	 				location.href="{:U('Survey/index')}";
            	 			}
            	 		}
            	 	});
            });
        });
        
    </script>

</head>
<body>
<!--pc头部-->
<include file="./Public/public/top.html" />
<!--pc头部结束-->
<!--mobile头部-->

<!--mobile头部结束-->
<div class="layout-wrap">
    <!--已审核-->
    <div class="layout">
    <include file="./Public/public/centerLeft.html" />
        <div class="right overview" style="min-height: 882px;">
            <h3>概览
            		<if condition="$sig.status eq 1">
                           		<a class="button-s button-gray" style="float: right;">
                        			签到天数：{$sig.number}天&nbsp;&nbsp;已签到
                        		</a>
					    	<else /> 
						    	<a class="button-s button-blue" id="sign_in" style="float: right;">
                         			签到天数：{$sig.number}天&nbsp;&nbsp;签到有惊喜
                         		</a>
					   		</if>
            </h3>
                        <div class="split-dot mt10 mb10">
                        </div>

      <div class="group-wrapper">
                <div class="group">
                    <div class="box c4">
                        <div class="number">{$totalMoney}</div>
                        <div class="subtitle">我的资金总额</div>
                        <div class="btn-group">
                        <a class="button-s button-blue " href="{:U('Center/charge')}">充值</a>
                        <a class="button-s button-gray " href="{:U('Depositlog/index')}">提现</a>
                        </div>
                    </div>
                    <div class="box c4">
                        <div class="number">{$total}</div>
                        <div class="subtitle">我的域名总数</div>
                        <div class="btn-group">
                        <a class="button-s button-blue " href="{:U('DomainAudit/save')}">转入</a>
                        <a class="button-s button-gray " href="{:U('Mydomain/index')}">转出</a>
                        </div>                        
                        
                    </div>
                    <div class="box c4">
                        <div class="number">{$high}</div>
                        <div class="subtitle" title="资金+拥有域名*行情价">我的资产总数</div>
                        <div class="btn-group">
                        </div>                        
                        
                    </div>
                    <div class="box c4">
                        <div class="number">{$userAssets.creditmoney}</div>
                        <div class="subtitle">理财宝金额</div>
                        <div class="btn-group">
                        <a class="button-s button-blue" href="#" id="zhuanruclas">转入</a>
                        <a class="button-s button-gray" href="#" id="zhuanchuclas">转出</a>
                        </div>
                    </div>                  

                    <div class="clr"></div>
                </div>
            </div>

            <div class="split-dot mt10 mb10"></div>
            
      <div class="group-wrapper">
      <div class="group-wrapper">
                <div class="group">
                    <div class="box">
                    
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-cny"></i>账户可用余额</div>
                              <div class="value w30">
                              <a>
	                              <if condition="$userAssets.avail_money eq null">
	                 				0.00
			                 	  <else/> 
							    		{$userAssets.avail_money}
						   		  </if>
                              </a>
                              </div>
                              <div class="clr"> </div>
                        </div>

                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-cny"></i>可提现金额</div>
                              <div class="value w30">
                              <a>
                              	<if condition="$userAssets.present_money eq null">
	                 				0.00
			                 	  <else/> 
							    		{$userAssets.present_money}
						   		  </if>
                              </a>
    
                              </div>
                              <div class="clr"> </div>
                        </div>                    
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-cny"></i>不可提现金额</div>
                              <div class="value w30">
                              <a>
                              	<if condition="$userAssets.notpresent_money eq null">
	                 				0.00
			                 	  <else/> 
							    		{$userAssets.notpresent_money}
						   		  </if>
                              </a>
                              </div>
                              <div class="clr"> </div>
                        </div>  
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-cny"></i>锁定金额</div>
                              <div class="value w30">
                              <a>
                              	<if condition="$userAssets.locked_money eq null">
	                 				0.00
			                 	  <else/> 
							    		{$userAssets.locked_money}
						   		  </if>
                              </a>
                              </div>
                              <div class="clr"> </div>
                        </div>                          
                        
                    </div>
                    
                    <div class="box">
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-database"></i>可交易/抵押域名</div>
                              <div class="value w30">
                              <a>{$normalCount}</a>
    
                              </div>
                              <div class="clr"> </div>
                        </div>                    
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-database"></i>交易中的域名</div>
                              <div class="value w30">
                              <a>{$inOrderCount}</a>
    
                              </div>
                              <div class="clr"> </div>
                        </div>  
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-database"></i>抵押中的域名</div>
                              <div class="value w30">
                              <a>{$mortageCount}</a>
    
                              </div>
                              <div class="clr"> </div>
                        </div>                          
                        <div class="s-row">
                              <div class="key w55"><i class="fa fa-database"></i>转出中的域名</div>
                              <div class="value w30">
                              <a>{$transOutCount}</a>

                              </div>
                              <div class="clr"> </div>
                        </div>                          
                    </div>
                  

                    <div class="clr"></div>
                </div>
            </div>            
            </div>

            <div class="table-wrappper">
            <div class="table table-w200">
                <div class="th">
                     <div class="td w10"><span class="ml10">交易类型</span></div>
                    <div class="td w15"><span class="ml10">时间</span></div>
                    <div class="td w10"><span class="ml10">状态</span></div>
                    <div class="td w15"><span class="ml10">域名品种</span></div>
                    <div class="td w10"><span class="ml10">委托单价</span></div>
                    <div class="td w10"><span class="ml10">数量</span></div>
                    <div class="td w10"><span class="ml10">已成交</span></div>
                    <div class="td w10"><span class="ml10">剩余</span></div>
                    <div class="td w10"><span class="ml10">操作</span></div>
                     <div class="clr"></div>
                </div>
                <if condition="$count neq 0">
						<volist name="list" id="vo">
							<div class="tr domain">
								<div class="td w10">
			                     	<span class="ml10">
			      						  <if condition="$vo.trans_type eq 1">
			                 				买入
					                 	  <elseif condition="$vo.trans_type eq 2"/> 
									    		卖出
								   		  </if>           
			                     	</span>
		                     	</div>
			                     <div class="td w15"><span class="ml10">{$vo.createdate}</span></div>
			                     <div class="td w10">
			                     	<span class="ml10">
			      						  <if condition="$vo.status eq 0">
			                 				进行中
					                 	  <elseif condition="$vo.status eq 1"/> 
									    	已结束
								    		<elseif condition="$vo.status eq 2"/> 
								    		已撤单
								   		  </if>           
			                     	</span>
		                     	</div>
			                     <div class="td w15"><span class="ml10">{$vo.domainType.name}</span></div>
			                     <div class="td w10"><span class="ml10">{$vo.unit_price}</span></div>
			                     <div class="td w10"><span class="ml10">{$vo.dnumber}</span></div>
             			         <div class="td w10"><span class="ml10">{$vo.status}</span></div>
             			         <div class="td w10"><span class="ml10">{$vo.surplus}</span></div>
        			             <div class="td w10">
        			             	<if condition="$vo.status eq 0 ">
		                 				<a class="button-s button-blue" action="cancel_order" data-id="{$vo.id}">
	                         			撤&nbsp;&nbsp;单
	                         			</a>
						   		   </if>
        			             </div>
			                     <div class="clr"></div>
			                </div>
						</volist>
				<else/>
					<div class="empty" style="height:400px;"></div> 
				</if>
            </div>
            </div>
            <div class="pt10 pb10">
                <div class="dataTables_paginate paging_full_numbers">
                    <div>
                                            </div>
                </div>
            </div>


        </div>

        <div class="clr"></div>
    </div>
</div>
<div popup="confirm" class="reveal-modal medium" topmeasure="50" topoffset="256" locked="false" animation="none" 
    animationspeed="500" closeonbackgroundclick="true" dismissmodalclass="close-reveal-modal" 
dismissjqobject="[action=&quot;cancel&quot;]" z-index="1001" switch="open" style="z-index: 1002; display: none; top: 650px;">
    <a class="close-reveal-modal" action="closeModal">×</a>
    <div class="confirm-inner">
            <img src="{$app_path}{$static_path}/img/icon_orange_question.png">
            <span action="msg"></span>
    </div>

    <div class="split-dot mb20 text-center"></div>
    <div class="form-row">
        <a action="confirm" class=" button button-orange w40 fl">知道了</a>
        <a action="cancel" class=" button button-gray w40 fr">取消</a>
        <div class="clr"></div>
    </div>
</div>

<div popup="confirmcreidt" class="reveal-modal medium">
    <a class="close-reveal-modal" action="closeModal">×</a>
    <h3 id="popupTitle"></h3>
    <div>
    <form method="post" action="{:U('Survey/assetcredit')}" id="ddidsdsdsds">
        <input  id="creditid" type="hidden" name="typed" value="">
	    <div class="form-row form-row-s mt20">
	        <div class="input-name w30">金额</div>
	        <div class="input-box w65">
		        <input id="smscode" name="money" type="number" class="input-s" placeholder="金额">
	        </div><br/>
	        <div class="input-name w30">支付密码</div>
	        <div class="input-box w65">
		        <input id="mimaid" name="authpwd" type="password" class="input-s" placeholder="支付密码">
	        </div>
	        <div class="clr"></div>
	    </div> 
    <div class="split-dot mb20 mt20 text-center"></div>
    <div class="form-row form-row-s">
        <a action="confirmf" id="tijiaolicai" class=" button button-blue w45 fl">确认</a>
        <a action="cancel" class=" button button-gray w45 fr">取消</a>
        <div class="clr"></div>
    </div>
    </form>
    </div>
</div>
<include file="./Public/public/footer.html" />
</body></html>